<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th = "http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>更新员工主要信息页面</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<div th:replace="~{commons/commons::Topbar}"></div>

<div class="container-fluid">
    <div class="row">
        <!--侧边栏-->
        <div th:replace="~{commons/commons::Sidebar(active='employList.html')}"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">

            <form class="form-horizontal" th:action="@{/update}" method="post">
                <input type="hidden" th:value="${employee.getId()}" name="id">
                <div class="form-group">
                    <label>姓名</label>
                    <input th:value="${employee.getLastName()}" type="text" name="lastName" class="form-control" placeholder="ruoyan">
                </div>
                <div class="form-group">
                    <label>职位</label>
                    <input th:value="${employee.getPost()}" type="text" name="post" class="form-control" placeholder="普通员工/XXX部部长/经理/董事长" >
                </div>
                <div class="form-group">
                    <label>邮箱</label>
                    <input th:value="${employee.getEmail()}" type="email" name="email" class="form-control" placeholder="xxxxxxxx@qq.com">
                </div>
                <div class="form-group">
                    <label>性别</label><br>
                    <div class="form-check-inline form-check">
                        <input th:checked="${employee.getGender()== 1}" class="form-check-input" type="radio" name="gender" value="1">
                        <label class="form-check-label">男</label>
                    </div>
                    <div class="form-check-inline form-check">
                        <input th:checked="${employee.getGender()== 0}" class="form-check-input" type="radio" name="gender" value="0">
                        <label class="form-check-label">女</label>
                    </div>
                </div>
                <div class="form-group">
                    <label>所在部门</label>
                    <select class="form-control" name="did">
                        <option th:each="department:${departments}" th:selected="${department.getId() == employee.getDid()}" th:text="${department.getDepartmentName()}" th:value="${department.getId()}"></option>

                    </select>
                </div>
                <div class="form-group">
                    <label>生日</label>
                    <input th:value="${#dates.format(employee.getBirth(),'yyyy-MM-dd')}" type="date" name="birth" class="form-control" placeholder="yyyy-MM-dd 不填写则日期默认为当天">
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary">修改</button>
                </div>
            </form>

        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="asserts/js/popper.min.js"></script>
<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>



</body>

</html>
